<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
        {{ config('blog.title') }}
    </title>
    <link rel="stylesheet" type="text/css" href="{{ asset('css/app.css') }}" rel="stylesheet">
</head>
<body>
    <div class="container">
        <h1>{{ config('blog.title') }}</h1>
        <h5> page {{ $posts->currentPage() }} of {{ $posts->lastPage() }} </h5>
        <hr>
        <ul>
        @foreach ($posts as $post)
            <li>
                <a href="{{ route('blog.detail', ['slug' => $post->slug]) }}"> {{ $post->title }}</a>
                <em>({{ $post->published_at }})</em>
                <p>
                    {{ str_limit($post->content) }}
                </p>
            </li>
        @endforeach
        </ul>
        <hr>
        {!! $posts->render() !!}
    </div>
</body>
</html>